<?php
require PATH_CONTROLLERS . 'BaseController.php';
class IndexController extends BaseController {
    /**
     * 初始化模块名
     */
    function _run() {
        global $module, $class, $action;
        parent::$module = strtolower($module);
        parent::$class = strtolower($class);
        parent::$action = strtolower($action);
    }
    
    /**
     * 引入视图页
     * @param string $file_name 文件名称不含后缀
     * @return type
     */
    static protected function display($file_name = '') {
        if (empty($file_name)) {
            $file_name = parent::$class;
        }
        return PATH_VIEWS . parent::$module . '/' . $file_name . '.php';
    }
}